Modern computing systems such as smartphones, tablets, and other mobile devices enable users to install and run various applications. Some applications may be configured with analytics engines that are called during the operation of the device. For example, the main program code of a mobile application may be configured to send function calls to an analytics module to collect and process analytics data about how the device is operated.
Computing systems are capable of executing various types and formats of program instruction code associated with an application, including native code and bytecode implementations. Native code may be defined as computer programming instructions that are compiled to run on a particular processor and its instruction set. When executed on its native processor, native code requires no additional processing or interpretation in order to run. Bytecode, also known as portable code, is a more generic form of program instructions designed for execution by a software interpreter. A bytecode program may be executed by parsing and directly executing the instructions individually, line by line. Bytecode programs may be processed and compiled into native code implementations for specific processors and instruction sets to improve efficiency and execution speed.
In the fields of computer hardware and software technology, it is possible in various runtime environments to modify how a method, function, class, or other such software component maps to the actual code implementation of the component. Sometimes referred to as swizzling, such re-mapping technology allows code associated with one function to be replaced by code associated with another function. This may be useful in the context of making modifications to a user interface, for example.
Some implementations of re-mapping technology involve modifying the value of a pointer that points to a location in memory where a method is implemented in code. By changing the value of the pointer, the method can be made to point to other code such that, when the method is called, a different method is employed in its place. The target method that is called in place of the original method is sometimes referred to as a callback function.